a=[
    [1]
]
i = 0
while(len(a)<6):
    a.append([])
    a[-1].append(1)
    j = 1
    while(j<len(a[-2])):
        a[-1].append(a[-2][j]+a[-2][j-1])
        j = j + 1
    a[-1].append(1)
    i = i + 1
k = 0
while(k<len(a)):
    l = 0
    while(l<len(a[k])):
        print("{:<3d}".format(a[k][l]),end="")
        l = l + 1
    print()
    k = k + 1